home *** CD-ROM | disk | FTP | other *** search
- {$G+,X+}
-
- {Conditional defines that may affect this unit}
- {$I AWDEFINE.INC}
-
- {*********************************************************}
- {* DOWNDIR.PAS 1.01 *}
- {* Copyright (c) TurboPower Software 1995 *}
- {* All rights reserved. *}
- {*********************************************************}
-
- unit Downdir;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls, FileCtrl, Buttons, AdMisc, TComIni;
-
- type
- TDownloadDirectoryForm = class(TForm)
- GroupBox1: TGroupBox;
- DownloadDirEdit: TEdit;
- DirectoryListBox: TDirectoryListBox;
- DriveComboBox: TDriveComboBox;
- OkBtn: TBitBtn;
- CancelBtn: TBitBtn;
- HelpBtn: TBitBtn;
- procedure DirectoryListBoxChange(Sender: TObject);
- procedure OkBtnClick(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- implementation
-
- {$R *.DFM}
-
- procedure TDownloadDirectoryForm.DirectoryListBoxChange(Sender: TObject);
- begin
- DownloadDirEdit.Text := LowerCase(DirectoryListBox.Directory);
- end;
-
- procedure TDownloadDirectoryForm.OkBtnClick(Sender: TObject);
- begin
- if not IsDirectory(DownloadDirEdit.Text) then begin
- MessageDlg('Invalid directory.', mtError, [mbOk], 0);
- DownloadDirEdit.SetFocus;
- ModalResult := mrNone;
- end;
- end;
-
- procedure TDownloadDirectoryForm.FormCreate(Sender: TObject);
- begin
- if IsDirectory(DownloadDir) then
- DirectoryListBox.Directory := DownloadDir
- else
- DirectoryListBox.Directory := '';
- end;
-
- end.
-
-